package com.RedRiver.hospitalsystem.record_service.client.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.time.LocalDateTime;

@Data
@ApiModel("挂号参数对象")
public class CreateSerialParam {
    /**
     * 部门id
     */
    @ApiModelProperty("部门id")
    @Min(value = 1,message = "部门id为正整数")
    private Integer departmentId;
    /**
     * 号时间
     */
    @ApiModelProperty("就诊时间")
    @NotNull(message = "就诊时间不能为空")
    private LocalDateTime serialDate;
    /**
     * 医生id
     */
    @ApiModelProperty("医生id")
    @Min(value = 1,message = "医生id为正整数")
    private Integer doctorId;
    /**
     * 证件号
     */
    @ApiModelProperty("证件号")
    @NotBlank(message = "证件号不能为空")
    @Pattern(regexp = "(^\\d{18}$)|(^\\d{17}(\\d|X|x)$)",message = "身份证号为18位")
    private String serialCard;
    /**
     * 证件类别编号
     */
    @ApiModelProperty("证件类别编号")
    @Min(value = 1,message = "部门id为正整数")
    private Integer papersId;
    /**
     * 接诊类型(0.初诊，1.复诊)
     */
    @ApiModelProperty("接诊类型(0.初诊，1.复诊)")
    @Min(value = 0,message = "接诊类型为正整数")
    private Integer serialType;
    /**
     * 姓名
     */
    @ApiModelProperty("姓名")
    @NotBlank(message = "姓名不能为空")
    private String patientName;
    /**
     * 民族
     */
    @ApiModelProperty("民族")
    @NotBlank(message = "民族不能为空")
    private String patientNation;
    /**
     * 家庭地址
     */
    @ApiModelProperty("家庭地址")
    @NotBlank(message = "家庭地址不能为空")
    private String patientAddress;
    /**
     * 有无遗传史
     */
    @ApiModelProperty("有无遗传史")
    @NotBlank(message = "有无遗传史不能为空")
    private String patientHistory;

}
